<script setup>
	import Ws from './utool/ws/ws';
	import {computed,watch} from 'vue'
	import useUserStore from '@/stores/store/user.js'
	const userStore = useUserStore()
	const userLoginStatus = computed(()=>userStore.LoginStatus)
	Ws.onMessage((e)=>{
		let data = JSON.parse(e)
		console.log("ws onMessage");
		console.log(data);
	})
	userStore.InitUserInfo()
	watch(userLoginStatus,(newVal,oldValue)=>{
		if(!newVal){
			uni.navigateTo({
				url: "/pages/login/login"
			})
		}
	})
</script>
<style lang="scss" >
	@import url("./static/css/style.scss");
	@import url('./static/css/style.css');
</style>